In [1]:
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf

keras = tf.keras
In [2]:
def plot_series(time, series, format="-", start=0, end=None, label=None):
    plt.plot(time[start:end], series[start:end], format, label=label)
    plt.xlabel("Time")
    plt.ylabel("Value")
    if label:
        plt.legend(fontsize=14)
    plt.grid(True)
    
def trend(time, slope=0):
    return slope * time
  
  
def seasonal_pattern(season_time):
    """Just an arbitrary pattern, you can change it if you wish"""
    return np.where(season_time < 0.4,
                    np.cos(season_time * 2 * np.pi),
                    1 / np.exp(3 * season_time))

  
def seasonality(time, period, amplitude=1, phase=0):
    """Repeats the same pattern at each period"""
    season_time = ((time + phase) % period) / period
    return amplitude * seasonal_pattern(season_time)
  
  
def white_noise(time, noise_level=1, seed=None):
    rnd = np.random.RandomState(seed)
    return rnd.randn(len(time)) * noise_level
  

def sequential_window_dataset(series, window_size):
    series = tf.expand_dims(series, axis=-1)
    ds = tf.data.Dataset.from_tensor_slices(series)
    ds = ds.window(window_size + 1, shift=window_size, drop_remainder=True)
    ds = ds.flat_map(lambda window: window.batch(window_size + 1))
    ds = ds.map(lambda window: (window[:-1], window[1:]))
    return ds.batch(1).prefetch(1)
In [3]:
time = np.arange(4 * 365 + 1)

slope = 0.05
baseline = 10
amplitude = 40
series = baseline + trend(time, slope) + seasonality(time, period=365, amplitude=amplitude)

noise_level = 5
noise = white_noise(time, noise_level, seed=42)

series += noise

plt.figure(figsize=(10, 6))
plot_series(time, series)
plt.show()
In [4]:
split_time = 1000
time_train = time[:split_time]
x_train = series[:split_time]
time_valid = time[split_time:]
x_valid = series[split_time:]
In [5]:
class ResetStatesCallback(keras.callbacks.Callback):
    def on_epoch_begin(self, epoch, logs):
        self.model.reset_states()

LSTM RNN Forecasting

In [6]:
keras.backend.clear_session()
tf.random.set_seed(42)
np.random.seed(42)

window_size = 30
train_set = sequential_window_dataset(x_train, window_size)

model = keras.models.Sequential([
  keras.layers.LSTM(100, return_sequences=True, stateful=True,
                    batch_input_shape=[1, None, 1]),
  keras.layers.LSTM(100, return_sequences=True, stateful=True),
  keras.layers.Dense(1),
  keras.layers.Lambda(lambda x: x * 200.0)
])
lr_schedule = keras.callbacks.LearningRateScheduler(
    lambda epoch: 1e-8 * 10**(epoch / 20))
reset_states = ResetStatesCallback()
optimizer = keras.optimizers.SGD(lr=1e-8, momentum=0.9)
model.compile(loss=keras.losses.Huber(),
              optimizer=optimizer,
              metrics=["mae"])
history = model.fit(train_set, epochs=100,
                    callbacks=[lr_schedule, reset_states])
Epoch 1/100
33/33 [==============================] - 0s 7ms/step - loss: 90.9191 - mae: 91.4191
Epoch 2/100
33/33 [==============================] - 0s 6ms/step - loss: 83.8978 - mae: 84.3978
Epoch 3/100
33/33 [==============================] - 0s 6ms/step - loss: 75.4974 - mae: 75.9974
Epoch 4/100
33/33 [==============================] - 0s 6ms/step - loss: 66.0676 - mae: 66.5676
Epoch 5/100
33/33 [==============================] - 0s 6ms/step - loss: 55.5131 - mae: 56.0131
Epoch 6/100
33/33 [==============================] - 0s 6ms/step - loss: 43.7599 - mae: 44.2597
Epoch 7/100
33/33 [==============================] - 0s 6ms/step - loss: 30.7909 - mae: 31.2900
Epoch 8/100
33/33 [==============================] - 0s 6ms/step - loss: 17.1478 - mae: 17.6436
Epoch 9/100
33/33 [==============================] - 0s 6ms/step - loss: 10.0311 - mae: 10.5178
Epoch 10/100
33/33 [==============================] - 0s 7ms/step - loss: 10.0607 - mae: 10.5524
Epoch 11/100
33/33 [==============================] - 0s 6ms/step - loss: 9.8063 - mae: 10.2981
Epoch 12/100
33/33 [==============================] - 0s 6ms/step - loss: 9.3912 - mae: 9.8815
Epoch 13/100
33/33 [==============================] - 0s 6ms/step - loss: 9.0001 - mae: 9.4885
Epoch 14/100
33/33 [==============================] - 0s 6ms/step - loss: 8.6473 - mae: 9.1320
Epoch 15/100
33/33 [==============================] - 0s 6ms/step - loss: 8.3308 - mae: 8.8157
Epoch 16/100
33/33 [==============================] - 0s 6ms/step - loss: 8.0550 - mae: 8.5387
Epoch 17/100
33/33 [==============================] - 0s 6ms/step - loss: 7.8428 - mae: 8.3241
Epoch 18/100
33/33 [==============================] - 0s 6ms/step - loss: 7.6701 - mae: 8.1520
Epoch 19/100
33/33 [==============================] - 0s 6ms/step - loss: 7.5326 - mae: 8.0152
Epoch 20/100
33/33 [==============================] - 0s 6ms/step - loss: 7.4123 - mae: 7.8949
Epoch 21/100
33/33 [==============================] - 0s 6ms/step - loss: 7.3345 - mae: 7.8177
Epoch 22/100
33/33 [==============================] - 0s 7ms/step - loss: 7.2263 - mae: 7.7074
Epoch 23/100
33/33 [==============================] - 0s 7ms/step - loss: 7.0942 - mae: 7.5725
Epoch 24/100
33/33 [==============================] - 0s 6ms/step - loss: 6.9832 - mae: 7.4620
Epoch 25/100
33/33 [==============================] - 0s 6ms/step - loss: 6.8444 - mae: 7.3253
Epoch 26/100
33/33 [==============================] - 0s 7ms/step - loss: 6.7290 - mae: 7.2108
Epoch 27/100
33/33 [==============================] - 0s 6ms/step - loss: 6.5833 - mae: 7.0666
Epoch 28/100
33/33 [==============================] - 0s 6ms/step - loss: 6.4450 - mae: 6.9279
Epoch 29/100
33/33 [==============================] - 0s 6ms/step - loss: 6.2907 - mae: 6.7729
Epoch 30/100
33/33 [==============================] - 0s 6ms/step - loss: 6.1173 - mae: 6.5962
Epoch 31/100
33/33 [==============================] - 0s 6ms/step - loss: 5.9434 - mae: 6.4210
Epoch 32/100
33/33 [==============================] - 0s 6ms/step - loss: 5.7794 - mae: 6.2585
Epoch 33/100
33/33 [==============================] - 0s 6ms/step - loss: 5.6534 - mae: 6.1340
Epoch 34/100
33/33 [==============================] - 0s 6ms/step - loss: 5.5627 - mae: 6.0405
Epoch 35/100
33/33 [==============================] - 0s 6ms/step - loss: 5.4656 - mae: 5.9413
Epoch 36/100
33/33 [==============================] - 0s 7ms/step - loss: 5.3491 - mae: 5.8258
Epoch 37/100
33/33 [==============================] - 0s 6ms/step - loss: 5.2397 - mae: 5.7178
Epoch 38/100
33/33 [==============================] - 0s 6ms/step - loss: 5.1747 - mae: 5.6543
Epoch 39/100
33/33 [==============================] - 0s 6ms/step - loss: 5.1366 - mae: 5.6164
Epoch 40/100
33/33 [==============================] - 0s 6ms/step - loss: 5.0991 - mae: 5.5778
Epoch 41/100
33/33 [==============================] - 0s 6ms/step - loss: 5.1034 - mae: 5.5833
Epoch 42/100
33/33 [==============================] - 0s 6ms/step - loss: 5.1371 - mae: 5.6149
Epoch 43/100
33/33 [==============================] - 0s 6ms/step - loss: 5.1539 - mae: 5.6325
Epoch 44/100
33/33 [==============================] - 0s 7ms/step - loss: 5.1025 - mae: 5.5813
Epoch 45/100
33/33 [==============================] - 0s 6ms/step - loss: 5.5236 - mae: 6.0050
Epoch 46/100
33/33 [==============================] - 0s 6ms/step - loss: 6.0236 - mae: 6.5054
Epoch 47/100
33/33 [==============================] - 0s 6ms/step - loss: 6.3322 - mae: 6.8183
Epoch 48/100
33/33 [==============================] - 0s 7ms/step - loss: 7.4924 - mae: 7.9806
Epoch 49/100
33/33 [==============================] - 0s 6ms/step - loss: 8.1303 - mae: 8.6211
Epoch 50/100
33/33 [==============================] - 0s 6ms/step - loss: 11.0320 - mae: 11.5218
Epoch 51/100
33/33 [==============================] - 0s 6ms/step - loss: 5.9608 - mae: 6.4464
Epoch 52/100
33/33 [==============================] - 0s 6ms/step - loss: 8.0853 - mae: 8.5729
Epoch 53/100
33/33 [==============================] - 0s 7ms/step - loss: 8.6677 - mae: 9.1565
Epoch 54/100
33/33 [==============================] - 0s 7ms/step - loss: 11.0260 - mae: 11.5162
Epoch 55/100
33/33 [==============================] - 0s 6ms/step - loss: 9.2377 - mae: 9.7287
Epoch 56/100
33/33 [==============================] - 0s 6ms/step - loss: 14.0616 - mae: 14.5566
Epoch 57/100
33/33 [==============================] - 0s 6ms/step - loss: 11.2927 - mae: 11.7865
Epoch 58/100
33/33 [==============================] - 0s 7ms/step - loss: 9.7924 - mae: 10.2825
Epoch 59/100
33/33 [==============================] - 0s 6ms/step - loss: 20.5439 - mae: 21.0352
Epoch 60/100
33/33 [==============================] - 0s 6ms/step - loss: 21.6066 - mae: 22.1004
Epoch 61/100
33/33 [==============================] - 0s 6ms/step - loss: 14.8527 - mae: 15.3486
Epoch 62/100
33/33 [==============================] - 0s 6ms/step - loss: 17.4853 - mae: 17.9803
Epoch 63/100
33/33 [==============================] - 0s 6ms/step - loss: 13.0441 - mae: 13.5368
Epoch 64/100
33/33 [==============================] - 0s 6ms/step - loss: 9.5840 - mae: 10.0718
Epoch 65/100
33/33 [==============================] - 0s 6ms/step - loss: 13.4697 - mae: 13.9598
Epoch 66/100
33/33 [==============================] - 0s 7ms/step - loss: 12.2081 - mae: 12.7018
Epoch 67/100
33/33 [==============================] - 0s 6ms/step - loss: 16.0403 - mae: 16.5327
Epoch 68/100
33/33 [==============================] - 0s 6ms/step - loss: 12.5217 - mae: 13.0125
Epoch 69/100
33/33 [==============================] - 0s 6ms/step - loss: 16.6670 - mae: 17.1614
Epoch 70/100
33/33 [==============================] - 0s 6ms/step - loss: 17.0632 - mae: 17.5551
Epoch 71/100
33/33 [==============================] - 0s 6ms/step - loss: 12.4808 - mae: 12.9731
Epoch 72/100
33/33 [==============================] - 0s 6ms/step - loss: 9.7367 - mae: 10.2256
Epoch 73/100
33/33 [==============================] - 0s 6ms/step - loss: 27.4516 - mae: 27.9494
Epoch 74/100
33/33 [==============================] - 0s 6ms/step - loss: 17.3039 - mae: 17.7997
Epoch 75/100
33/33 [==============================] - 0s 6ms/step - loss: 16.8151 - mae: 17.3107
Epoch 76/100
33/33 [==============================] - 0s 6ms/step - loss: 10.9015 - mae: 11.3919
Epoch 77/100
33/33 [==============================] - 0s 6ms/step - loss: 10.8313 - mae: 11.3188
Epoch 78/100
33/33 [==============================] - 0s 6ms/step - loss: 18.3577 - mae: 18.8528
Epoch 79/100
33/33 [==============================] - 0s 6ms/step - loss: 17.3953 - mae: 17.8918
Epoch 80/100
33/33 [==============================] - 0s 6ms/step - loss: 14.3315 - mae: 14.8260
Epoch 81/100
33/33 [==============================] - 0s 6ms/step - loss: 11.0187 - mae: 11.5131
Epoch 82/100
33/33 [==============================] - 0s 6ms/step - loss: 13.6761 - mae: 14.1616
Epoch 83/100
33/33 [==============================] - 0s 6ms/step - loss: 11.8563 - mae: 12.3520
Epoch 84/100
33/33 [==============================] - 0s 6ms/step - loss: 16.8495 - mae: 17.3432
Epoch 85/100
33/33 [==============================] - 0s 6ms/step - loss: 20.7220 - mae: 21.2175
Epoch 86/100
33/33 [==============================] - 0s 6ms/step - loss: 23.8672 - mae: 24.3624
Epoch 87/100
33/33 [==============================] - 0s 6ms/step - loss: 31.4446 - mae: 31.9437
Epoch 88/100
33/33 [==============================] - 0s 7ms/step - loss: 27.5935 - mae: 28.0884
Epoch 89/100
33/33 [==============================] - 0s 7ms/step - loss: 25.3679 - mae: 25.8586
Epoch 90/100
33/33 [==============================] - 0s 6ms/step - loss: 26.0335 - mae: 26.5311
Epoch 91/100
33/33 [==============================] - 0s 6ms/step - loss: 40.2144 - mae: 40.7131
Epoch 92/100
33/33 [==============================] - 0s 6ms/step - loss: 33.3154 - mae: 33.8143
Epoch 93/100
33/33 [==============================] - 0s 6ms/step - loss: 33.2166 - mae: 33.7144
Epoch 94/100
33/33 [==============================] - 0s 6ms/step - loss: 53.2613 - mae: 53.7586
Epoch 95/100
33/33 [==============================] - 0s 6ms/step - loss: 58.7900 - mae: 59.2888
Epoch 96/100
33/33 [==============================] - 0s 6ms/step - loss: 39.9028 - mae: 40.4008
Epoch 97/100
33/33 [==============================] - 0s 6ms/step - loss: 44.4015 - mae: 44.9006
Epoch 98/100
33/33 [==============================] - 0s 6ms/step - loss: 51.3196 - mae: 51.8179
Epoch 99/100
33/33 [==============================] - 0s 6ms/step - loss: 73.1629 - mae: 73.6617
Epoch 100/100
33/33 [==============================] - 0s 6ms/step - loss: 54.0318 - mae: 54.5270
In [7]:
plt.semilogx(history.history["lr"], history.history["loss"])
plt.axis([1e-8, 1e-4, 0, 30])
Out[7]:
(1e-08, 0.0001, 0.0, 30.0)
In [8]:
keras.backend.clear_session()
tf.random.set_seed(42)
np.random.seed(42)

window_size = 30
train_set = sequential_window_dataset(x_train, window_size)
valid_set = sequential_window_dataset(x_valid, window_size)

model = keras.models.Sequential([
  keras.layers.LSTM(100, return_sequences=True, stateful=True,
                         batch_input_shape=[1, None, 1]),
  keras.layers.LSTM(100, return_sequences=True, stateful=True),
  keras.layers.Dense(1),
  keras.layers.Lambda(lambda x: x * 200.0)
])
optimizer = keras.optimizers.SGD(lr=5e-7, momentum=0.9)
model.compile(loss=keras.losses.Huber(),
              optimizer=optimizer,
              metrics=["mae"])
reset_states = ResetStatesCallback()
model_checkpoint = keras.callbacks.ModelCheckpoint(
    "my_checkpoint.h5", save_best_only=True)
early_stopping = keras.callbacks.EarlyStopping(patience=50)
model.fit(train_set, epochs=500,
          validation_data=valid_set,
          callbacks=[early_stopping, model_checkpoint, reset_states])
Epoch 1/500
33/33 [==============================] - 1s 28ms/step - loss: 30.0122 - mae: 30.5050 - val_loss: 13.0810 - val_mae: 13.5746
Epoch 2/500
33/33 [==============================] - 0s 9ms/step - loss: 15.3618 - mae: 15.8570 - val_loss: 10.0991 - val_mae: 10.5941
Epoch 3/500
33/33 [==============================] - 0s 8ms/step - loss: 10.9284 - mae: 11.4173 - val_loss: 11.2192 - val_mae: 11.7083
Epoch 4/500
33/33 [==============================] - 0s 8ms/step - loss: 9.8165 - mae: 10.3052 - val_loss: 12.2806 - val_mae: 12.7757
Epoch 5/500
33/33 [==============================] - 0s 9ms/step - loss: 7.8424 - mae: 8.3317 - val_loss: 9.6437 - val_mae: 10.1336
Epoch 6/500
33/33 [==============================] - 0s 9ms/step - loss: 7.1708 - mae: 7.6561 - val_loss: 10.6124 - val_mae: 11.1036
Epoch 7/500
33/33 [==============================] - 0s 8ms/step - loss: 5.9200 - mae: 6.4041 - val_loss: 10.1595 - val_mae: 10.6522
Epoch 8/500
33/33 [==============================] - 0s 9ms/step - loss: 5.6843 - mae: 6.1652 - val_loss: 9.6997 - val_mae: 10.1896
Epoch 9/500
33/33 [==============================] - 0s 9ms/step - loss: 5.6694 - mae: 6.1486 - val_loss: 10.0423 - val_mae: 10.5330
Epoch 10/500
33/33 [==============================] - 0s 8ms/step - loss: 5.7491 - mae: 6.2312 - val_loss: 9.8009 - val_mae: 10.2917
Epoch 11/500
33/33 [==============================] - 0s 9ms/step - loss: 5.8786 - mae: 6.3598 - val_loss: 9.6807 - val_mae: 10.1714
Epoch 12/500
33/33 [==============================] - 0s 9ms/step - loss: 5.9175 - mae: 6.3984 - val_loss: 9.4422 - val_mae: 9.9319
Epoch 13/500
33/33 [==============================] - 0s 9ms/step - loss: 5.8339 - mae: 6.3116 - val_loss: 9.1527 - val_mae: 9.6419
Epoch 14/500
33/33 [==============================] - 0s 8ms/step - loss: 5.7167 - mae: 6.1943 - val_loss: 9.1645 - val_mae: 9.6542
Epoch 15/500
33/33 [==============================] - 0s 9ms/step - loss: 5.5860 - mae: 6.0623 - val_loss: 9.4113 - val_mae: 9.9008
Epoch 16/500
33/33 [==============================] - 0s 9ms/step - loss: 5.4922 - mae: 5.9689 - val_loss: 9.6087 - val_mae: 10.0986
Epoch 17/500
33/33 [==============================] - 0s 8ms/step - loss: 5.4966 - mae: 5.9752 - val_loss: 9.6966 - val_mae: 10.1863
Epoch 18/500
33/33 [==============================] - 0s 8ms/step - loss: 5.5476 - mae: 6.0263 - val_loss: 9.6846 - val_mae: 10.1746
Epoch 19/500
33/33 [==============================] - 0s 9ms/step - loss: 5.6006 - mae: 6.0809 - val_loss: 9.6537 - val_mae: 10.1434
Epoch 20/500
33/33 [==============================] - 0s 8ms/step - loss: 5.6103 - mae: 6.0913 - val_loss: 9.5965 - val_mae: 10.0860
Epoch 21/500
33/33 [==============================] - 0s 8ms/step - loss: 5.5743 - mae: 6.0525 - val_loss: 9.5047 - val_mae: 9.9941
Epoch 22/500
33/33 [==============================] - 0s 8ms/step - loss: 5.5159 - mae: 5.9908 - val_loss: 9.4526 - val_mae: 9.9416
Epoch 23/500
33/33 [==============================] - 0s 8ms/step - loss: 5.4661 - mae: 5.9414 - val_loss: 9.4918 - val_mae: 9.9810
Epoch 24/500
33/33 [==============================] - 0s 8ms/step - loss: 5.4316 - mae: 5.9093 - val_loss: 9.5130 - val_mae: 10.0043
Epoch 25/500
33/33 [==============================] - 0s 9ms/step - loss: 5.4204 - mae: 5.8999 - val_loss: 9.5088 - val_mae: 10.0010
Epoch 26/500
33/33 [==============================] - 0s 8ms/step - loss: 5.4186 - mae: 5.8987 - val_loss: 9.4891 - val_mae: 9.9818
Epoch 27/500
33/33 [==============================] - 0s 8ms/step - loss: 5.4135 - mae: 5.8932 - val_loss: 9.4548 - val_mae: 9.9476
Epoch 28/500
33/33 [==============================] - 0s 9ms/step - loss: 5.4015 - mae: 5.8806 - val_loss: 9.4135 - val_mae: 9.9062
Epoch 29/500
33/33 [==============================] - 0s 9ms/step - loss: 5.3869 - mae: 5.8655 - val_loss: 9.3735 - val_mae: 9.8662
Epoch 30/500
33/33 [==============================] - 0s 8ms/step - loss: 5.3712 - mae: 5.8498 - val_loss: 9.3322 - val_mae: 9.8248
Epoch 31/500
33/33 [==============================] - 0s 9ms/step - loss: 5.3564 - mae: 5.8350 - val_loss: 9.2882 - val_mae: 9.7808
Epoch 32/500
33/33 [==============================] - 0s 9ms/step - loss: 5.3417 - mae: 5.8204 - val_loss: 9.2416 - val_mae: 9.7340
Epoch 33/500
33/33 [==============================] - 0s 9ms/step - loss: 5.3267 - mae: 5.8054 - val_loss: 9.1931 - val_mae: 9.6855
Epoch 34/500
33/33 [==============================] - 0s 9ms/step - loss: 5.3104 - mae: 5.7891 - val_loss: 9.1413 - val_mae: 9.6336
Epoch 35/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2948 - mae: 5.7736 - val_loss: 9.0912 - val_mae: 9.5834
Epoch 36/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2808 - mae: 5.7595 - val_loss: 9.0401 - val_mae: 9.5321
Epoch 37/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2688 - mae: 5.7475 - val_loss: 8.9865 - val_mae: 9.4782
Epoch 38/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2582 - mae: 5.7368 - val_loss: 8.9292 - val_mae: 9.4204
Epoch 39/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2478 - mae: 5.7263 - val_loss: 8.8691 - val_mae: 9.3598
Epoch 40/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2369 - mae: 5.7155 - val_loss: 8.8074 - val_mae: 9.2974
Epoch 41/500
33/33 [==============================] - 0s 10ms/step - loss: 5.2250 - mae: 5.7036 - val_loss: 8.7454 - val_mae: 9.2347
Epoch 42/500
33/33 [==============================] - 0s 9ms/step - loss: 5.2118 - mae: 5.6905 - val_loss: 8.6859 - val_mae: 9.1747
Epoch 43/500
33/33 [==============================] - 0s 9ms/step - loss: 5.1972 - mae: 5.6763 - val_loss: 8.6281 - val_mae: 9.1162
Epoch 44/500
33/33 [==============================] - 0s 10ms/step - loss: 5.1813 - mae: 5.6606 - val_loss: 8.5700 - val_mae: 9.0573
Epoch 45/500
33/33 [==============================] - 0s 9ms/step - loss: 5.1642 - mae: 5.6438 - val_loss: 8.5138 - val_mae: 9.0003
Epoch 46/500
33/33 [==============================] - 0s 9ms/step - loss: 5.1463 - mae: 5.6260 - val_loss: 8.4536 - val_mae: 8.9391
Epoch 47/500
33/33 [==============================] - 0s 10ms/step - loss: 5.1282 - mae: 5.6080 - val_loss: 8.3915 - val_mae: 8.8757
Epoch 48/500
33/33 [==============================] - 0s 9ms/step - loss: 5.1110 - mae: 5.5906 - val_loss: 8.3288 - val_mae: 8.8123
Epoch 49/500
33/33 [==============================] - 0s 9ms/step - loss: 5.0950 - mae: 5.5745 - val_loss: 8.2669 - val_mae: 8.7504
Epoch 50/500
33/33 [==============================] - 0s 10ms/step - loss: 5.0798 - mae: 5.5591 - val_loss: 8.2066 - val_mae: 8.6900
Epoch 51/500
33/33 [==============================] - 0s 9ms/step - loss: 5.0644 - mae: 5.5435 - val_loss: 8.1468 - val_mae: 8.6307
Epoch 52/500
33/33 [==============================] - 0s 9ms/step - loss: 5.0486 - mae: 5.5274 - val_loss: 8.0832 - val_mae: 8.5679
Epoch 53/500
33/33 [==============================] - 0s 10ms/step - loss: 5.0323 - mae: 5.5108 - val_loss: 8.0271 - val_mae: 8.5125
Epoch 54/500
33/33 [==============================] - 0s 9ms/step - loss: 5.0146 - mae: 5.4930 - val_loss: 7.9815 - val_mae: 8.4674
Epoch 55/500
33/33 [==============================] - 0s 10ms/step - loss: 4.9958 - mae: 5.4740 - val_loss: 7.9396 - val_mae: 8.4258
Epoch 56/500
33/33 [==============================] - 0s 9ms/step - loss: 4.9777 - mae: 5.4556 - val_loss: 7.9008 - val_mae: 8.3874
Epoch 57/500
33/33 [==============================] - 0s 9ms/step - loss: 4.9600 - mae: 5.4378 - val_loss: 7.8673 - val_mae: 8.3541
Epoch 58/500
33/33 [==============================] - 0s 9ms/step - loss: 4.9414 - mae: 5.4198 - val_loss: 7.8364 - val_mae: 8.3233
Epoch 59/500
33/33 [==============================] - 0s 10ms/step - loss: 4.9229 - mae: 5.4017 - val_loss: 7.8052 - val_mae: 8.2919
Epoch 60/500
33/33 [==============================] - 0s 10ms/step - loss: 4.9055 - mae: 5.3841 - val_loss: 7.7852 - val_mae: 8.2718
Epoch 61/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8906 - mae: 5.3689 - val_loss: 7.7705 - val_mae: 8.2575
Epoch 62/500
33/33 [==============================] - 0s 10ms/step - loss: 4.8800 - mae: 5.3581 - val_loss: 7.7570 - val_mae: 8.2442
Epoch 63/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8741 - mae: 5.3520 - val_loss: 7.7333 - val_mae: 8.2205
Epoch 64/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8722 - mae: 5.3498 - val_loss: 7.6966 - val_mae: 8.1836
Epoch 65/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8715 - mae: 5.3490 - val_loss: 7.6494 - val_mae: 8.1360
Epoch 66/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8703 - mae: 5.3477 - val_loss: 7.5974 - val_mae: 8.0836
Epoch 67/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8671 - mae: 5.3447 - val_loss: 7.5479 - val_mae: 8.0336
Epoch 68/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8605 - mae: 5.3386 - val_loss: 7.5021 - val_mae: 7.9872
Epoch 69/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8501 - mae: 5.3287 - val_loss: 7.4629 - val_mae: 7.9475
Epoch 70/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8373 - mae: 5.3167 - val_loss: 7.4356 - val_mae: 7.9198
Epoch 71/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8242 - mae: 5.3040 - val_loss: 7.4154 - val_mae: 7.8996
Epoch 72/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8123 - mae: 5.2921 - val_loss: 7.4003 - val_mae: 7.8847
Epoch 73/500
33/33 [==============================] - 0s 9ms/step - loss: 4.8031 - mae: 5.2826 - val_loss: 7.3807 - val_mae: 7.8652
Epoch 74/500
33/33 [==============================] - 0s 10ms/step - loss: 4.7962 - mae: 5.2754 - val_loss: 7.3570 - val_mae: 7.8416
Epoch 75/500
33/33 [==============================] - 0s 10ms/step - loss: 4.7908 - mae: 5.2698 - val_loss: 7.3274 - val_mae: 7.8120
Epoch 76/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7861 - mae: 5.2651 - val_loss: 7.2960 - val_mae: 7.7805
Epoch 77/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7807 - mae: 5.2598 - val_loss: 7.2653 - val_mae: 7.7499
Epoch 78/500
33/33 [==============================] - 0s 10ms/step - loss: 4.7738 - mae: 5.2531 - val_loss: 7.2375 - val_mae: 7.7222
Epoch 79/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7650 - mae: 5.2446 - val_loss: 7.2146 - val_mae: 7.6995
Epoch 80/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7540 - mae: 5.2336 - val_loss: 7.2061 - val_mae: 7.6912
Epoch 81/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7409 - mae: 5.2206 - val_loss: 7.2074 - val_mae: 7.6927
Epoch 82/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7278 - mae: 5.2074 - val_loss: 7.2109 - val_mae: 7.6965
Epoch 83/500
33/33 [==============================] - 0s 8ms/step - loss: 4.7155 - mae: 5.1949 - val_loss: 7.2163 - val_mae: 7.7019
Epoch 84/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7051 - mae: 5.1843 - val_loss: 7.2190 - val_mae: 7.7044
Epoch 85/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6969 - mae: 5.1757 - val_loss: 7.2145 - val_mae: 7.6999
Epoch 86/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6917 - mae: 5.1703 - val_loss: 7.1949 - val_mae: 7.6802
Epoch 87/500
33/33 [==============================] - 0s 10ms/step - loss: 4.6904 - mae: 5.1688 - val_loss: 7.1590 - val_mae: 7.6443
Epoch 88/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6946 - mae: 5.1731 - val_loss: 7.0969 - val_mae: 7.5826
Epoch 89/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7069 - mae: 5.1860 - val_loss: 6.9948 - val_mae: 7.4810
Epoch 90/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7216 - mae: 5.2014 - val_loss: 6.9047 - val_mae: 7.3906
Epoch 91/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7094 - mae: 5.1872 - val_loss: 6.9057 - val_mae: 7.3916
Epoch 92/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6958 - mae: 5.1747 - val_loss: 6.9038 - val_mae: 7.3895
Epoch 93/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6750 - mae: 5.1530 - val_loss: 6.9370 - val_mae: 7.4225
Epoch 94/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6657 - mae: 5.1438 - val_loss: 6.9525 - val_mae: 7.4376
Epoch 95/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6477 - mae: 5.1251 - val_loss: 6.9946 - val_mae: 7.4794
Epoch 96/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6498 - mae: 5.1272 - val_loss: 7.0029 - val_mae: 7.4876
Epoch 97/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6275 - mae: 5.1044 - val_loss: 7.0682 - val_mae: 7.5530
Epoch 98/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6444 - mae: 5.1213 - val_loss: 7.0426 - val_mae: 7.5274
Epoch 99/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6084 - mae: 5.0841 - val_loss: 7.1595 - val_mae: 7.6452
Epoch 100/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6195 - mae: 5.0964 - val_loss: 7.0713 - val_mae: 7.5561
Epoch 101/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6172 - mae: 5.0927 - val_loss: 7.0731 - val_mae: 7.5580
Epoch 102/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6493 - mae: 5.1257 - val_loss: 6.9755 - val_mae: 7.4603
Epoch 103/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6196 - mae: 5.0946 - val_loss: 7.0608 - val_mae: 7.5457
Epoch 104/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6380 - mae: 5.1137 - val_loss: 6.8513 - val_mae: 7.3364
Epoch 105/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6720 - mae: 5.1471 - val_loss: 6.7294 - val_mae: 7.2154
Epoch 106/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7122 - mae: 5.1874 - val_loss: 6.6637 - val_mae: 7.1498
Epoch 107/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7030 - mae: 5.1816 - val_loss: 6.5765 - val_mae: 7.0622
Epoch 108/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7216 - mae: 5.2018 - val_loss: 6.4016 - val_mae: 6.8836
Epoch 109/500
33/33 [==============================] - 0s 9ms/step - loss: 4.7133 - mae: 5.1939 - val_loss: 6.3716 - val_mae: 6.8527
Epoch 110/500
33/33 [==============================] - 0s 10ms/step - loss: 4.6982 - mae: 5.1778 - val_loss: 6.3100 - val_mae: 6.7905
Epoch 111/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6685 - mae: 5.1485 - val_loss: 6.3300 - val_mae: 6.8107
Epoch 112/500
33/33 [==============================] - 0s 8ms/step - loss: 4.6339 - mae: 5.1145 - val_loss: 6.3569 - val_mae: 6.8386
Epoch 113/500
33/33 [==============================] - 0s 9ms/step - loss: 4.6043 - mae: 5.0852 - val_loss: 6.4010 - val_mae: 6.8836
Epoch 114/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5846 - mae: 5.0641 - val_loss: 6.4428 - val_mae: 6.9257
Epoch 115/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5718 - mae: 5.0500 - val_loss: 6.4661 - val_mae: 6.9491
Epoch 116/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5643 - mae: 5.0413 - val_loss: 6.4823 - val_mae: 6.9654
Epoch 117/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5600 - mae: 5.0360 - val_loss: 6.4904 - val_mae: 6.9733
Epoch 118/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5581 - mae: 5.0337 - val_loss: 6.4945 - val_mae: 6.9773
Epoch 119/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5579 - mae: 5.0335 - val_loss: 6.4901 - val_mae: 6.9728
Epoch 120/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5590 - mae: 5.0347 - val_loss: 6.4773 - val_mae: 6.9598
Epoch 121/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5624 - mae: 5.0382 - val_loss: 6.4616 - val_mae: 6.9439
Epoch 122/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5668 - mae: 5.0430 - val_loss: 6.4371 - val_mae: 6.9190
Epoch 123/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5730 - mae: 5.0498 - val_loss: 6.3981 - val_mae: 6.8795
Epoch 124/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5805 - mae: 5.0580 - val_loss: 6.3478 - val_mae: 6.8286
Epoch 125/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5904 - mae: 5.0684 - val_loss: 6.2879 - val_mae: 6.7684
Epoch 126/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5976 - mae: 5.0764 - val_loss: 6.2282 - val_mae: 6.7077
Epoch 127/500
33/33 [==============================] - 0s 10ms/step - loss: 4.6012 - mae: 5.0806 - val_loss: 6.1627 - val_mae: 6.6411
Epoch 128/500
33/33 [==============================] - 0s 10ms/step - loss: 4.6009 - mae: 5.0804 - val_loss: 6.1094 - val_mae: 6.5875
Epoch 129/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5965 - mae: 5.0763 - val_loss: 6.0683 - val_mae: 6.5465
Epoch 130/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5875 - mae: 5.0677 - val_loss: 6.0413 - val_mae: 6.5196
Epoch 131/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5753 - mae: 5.0564 - val_loss: 6.0272 - val_mae: 6.5055
Epoch 132/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5618 - mae: 5.0434 - val_loss: 6.0175 - val_mae: 6.4959
Epoch 133/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5496 - mae: 5.0313 - val_loss: 6.0180 - val_mae: 6.4965
Epoch 134/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5383 - mae: 5.0194 - val_loss: 6.0228 - val_mae: 6.5011
Epoch 135/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5299 - mae: 5.0103 - val_loss: 6.0303 - val_mae: 6.5088
Epoch 136/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5239 - mae: 5.0036 - val_loss: 6.0382 - val_mae: 6.5167
Epoch 137/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5194 - mae: 4.9986 - val_loss: 6.0417 - val_mae: 6.5203
Epoch 138/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5162 - mae: 4.9952 - val_loss: 6.0427 - val_mae: 6.5214
Epoch 139/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5142 - mae: 4.9928 - val_loss: 6.0470 - val_mae: 6.5257
Epoch 140/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5127 - mae: 4.9912 - val_loss: 6.0519 - val_mae: 6.5306
Epoch 141/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5115 - mae: 4.9899 - val_loss: 6.0559 - val_mae: 6.5347
Epoch 142/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5107 - mae: 4.9889 - val_loss: 6.0606 - val_mae: 6.5394
Epoch 143/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5103 - mae: 4.9883 - val_loss: 6.0643 - val_mae: 6.5432
Epoch 144/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5103 - mae: 4.9881 - val_loss: 6.0674 - val_mae: 6.5463
Epoch 145/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5104 - mae: 4.9883 - val_loss: 6.0692 - val_mae: 6.5482
Epoch 146/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5109 - mae: 4.9887 - val_loss: 6.0706 - val_mae: 6.5496
Epoch 147/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5115 - mae: 4.9893 - val_loss: 6.0712 - val_mae: 6.5502
Epoch 148/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5122 - mae: 4.9901 - val_loss: 6.0713 - val_mae: 6.5503
Epoch 149/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5131 - mae: 4.9911 - val_loss: 6.0721 - val_mae: 6.5511
Epoch 150/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5140 - mae: 4.9919 - val_loss: 6.0723 - val_mae: 6.5513
Epoch 151/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5148 - mae: 4.9928 - val_loss: 6.0716 - val_mae: 6.5506
Epoch 152/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5156 - mae: 4.9936 - val_loss: 6.0700 - val_mae: 6.5490
Epoch 153/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5162 - mae: 4.9942 - val_loss: 6.0678 - val_mae: 6.5468
Epoch 154/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5165 - mae: 4.9945 - val_loss: 6.0646 - val_mae: 6.5435
Epoch 155/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5166 - mae: 4.9946 - val_loss: 6.0612 - val_mae: 6.5401
Epoch 156/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5165 - mae: 4.9945 - val_loss: 6.0580 - val_mae: 6.5369
Epoch 157/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5162 - mae: 4.9943 - val_loss: 6.0549 - val_mae: 6.5338
Epoch 158/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5157 - mae: 4.9938 - val_loss: 6.0521 - val_mae: 6.5310
Epoch 159/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5150 - mae: 4.9931 - val_loss: 6.0492 - val_mae: 6.5281
Epoch 160/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5140 - mae: 4.9922 - val_loss: 6.0467 - val_mae: 6.5255
Epoch 161/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5128 - mae: 4.9909 - val_loss: 6.0446 - val_mae: 6.5234
Epoch 162/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5114 - mae: 4.9895 - val_loss: 6.0428 - val_mae: 6.5216
Epoch 163/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5098 - mae: 4.9879 - val_loss: 6.0417 - val_mae: 6.5205
Epoch 164/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5084 - mae: 4.9863 - val_loss: 6.0412 - val_mae: 6.5200
Epoch 165/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5068 - mae: 4.9847 - val_loss: 6.0411 - val_mae: 6.5199
Epoch 166/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5052 - mae: 4.9831 - val_loss: 6.0406 - val_mae: 6.5194
Epoch 167/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5038 - mae: 4.9817 - val_loss: 6.0396 - val_mae: 6.5183
Epoch 168/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5027 - mae: 4.9806 - val_loss: 6.0382 - val_mae: 6.5169
Epoch 169/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5019 - mae: 4.9798 - val_loss: 6.0358 - val_mae: 6.5145
Epoch 170/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5014 - mae: 4.9793 - val_loss: 6.0329 - val_mae: 6.5115
Epoch 171/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5013 - mae: 4.9792 - val_loss: 6.0294 - val_mae: 6.5080
Epoch 172/500
33/33 [==============================] - 0s 8ms/step - loss: 4.5015 - mae: 4.9795 - val_loss: 6.0242 - val_mae: 6.5028
Epoch 173/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5020 - mae: 4.9799 - val_loss: 6.0175 - val_mae: 6.4960
Epoch 174/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5026 - mae: 4.9805 - val_loss: 6.0088 - val_mae: 6.4873
Epoch 175/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5032 - mae: 4.9811 - val_loss: 5.9979 - val_mae: 6.4764
Epoch 176/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5040 - mae: 4.9818 - val_loss: 5.9853 - val_mae: 6.4636
Epoch 177/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5044 - mae: 4.9823 - val_loss: 5.9701 - val_mae: 6.4482
Epoch 178/500
33/33 [==============================] - 0s 9ms/step - loss: 4.5040 - mae: 4.9819 - val_loss: 5.9533 - val_mae: 6.4311
Epoch 179/500
33/33 [==============================] - 0s 10ms/step - loss: 4.5027 - mae: 4.9806 - val_loss: 5.9359 - val_mae: 6.4136
Epoch 180/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4995 - mae: 4.9776 - val_loss: 5.9199 - val_mae: 6.3974
Epoch 181/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4951 - mae: 4.9733 - val_loss: 5.9059 - val_mae: 6.3832
Epoch 182/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4896 - mae: 4.9680 - val_loss: 5.8927 - val_mae: 6.3698
Epoch 183/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4837 - mae: 4.9621 - val_loss: 5.8809 - val_mae: 6.3578
Epoch 184/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4777 - mae: 4.9560 - val_loss: 5.8717 - val_mae: 6.3484
Epoch 185/500
33/33 [==============================] - 0s 10ms/step - loss: 4.4720 - mae: 4.9500 - val_loss: 5.8624 - val_mae: 6.3390
Epoch 186/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4672 - mae: 4.9448 - val_loss: 5.8582 - val_mae: 6.3347
Epoch 187/500
33/33 [==============================] - 0s 10ms/step - loss: 4.4631 - mae: 4.9402 - val_loss: 5.8564 - val_mae: 6.3328
Epoch 188/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4601 - mae: 4.9368 - val_loss: 5.8563 - val_mae: 6.3327
Epoch 189/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4579 - mae: 4.9344 - val_loss: 5.8564 - val_mae: 6.3327
Epoch 190/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4564 - mae: 4.9328 - val_loss: 5.8560 - val_mae: 6.3323
Epoch 191/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4556 - mae: 4.9318 - val_loss: 5.8548 - val_mae: 6.3312
Epoch 192/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4551 - mae: 4.9313 - val_loss: 5.8525 - val_mae: 6.3288
Epoch 193/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4548 - mae: 4.9310 - val_loss: 5.8491 - val_mae: 6.3254
Epoch 194/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4544 - mae: 4.9306 - val_loss: 5.8446 - val_mae: 6.3208
Epoch 195/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4537 - mae: 4.9300 - val_loss: 5.8391 - val_mae: 6.3153
Epoch 196/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4526 - mae: 4.9290 - val_loss: 5.8333 - val_mae: 6.3094
Epoch 197/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4511 - mae: 4.9275 - val_loss: 5.8270 - val_mae: 6.3032
Epoch 198/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4492 - mae: 4.9257 - val_loss: 5.8213 - val_mae: 6.2974
Epoch 199/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4469 - mae: 4.9235 - val_loss: 5.8163 - val_mae: 6.2924
Epoch 200/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4443 - mae: 4.9209 - val_loss: 5.8118 - val_mae: 6.2880
Epoch 201/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4416 - mae: 4.9183 - val_loss: 5.8083 - val_mae: 6.2844
Epoch 202/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4390 - mae: 4.9157 - val_loss: 5.8055 - val_mae: 6.2816
Epoch 203/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4364 - mae: 4.9132 - val_loss: 5.8034 - val_mae: 6.2795
Epoch 204/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4339 - mae: 4.9108 - val_loss: 5.8022 - val_mae: 6.2783
Epoch 205/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4318 - mae: 4.9087 - val_loss: 5.8016 - val_mae: 6.2779
Epoch 206/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4299 - mae: 4.9069 - val_loss: 5.8016 - val_mae: 6.2778
Epoch 207/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4285 - mae: 4.9055 - val_loss: 5.8018 - val_mae: 6.2780
Epoch 208/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4274 - mae: 4.9044 - val_loss: 5.8021 - val_mae: 6.2784
Epoch 209/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4264 - mae: 4.9036 - val_loss: 5.8025 - val_mae: 6.2788
Epoch 210/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4256 - mae: 4.9028 - val_loss: 5.8029 - val_mae: 6.2792
Epoch 211/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4248 - mae: 4.9020 - val_loss: 5.8032 - val_mae: 6.2795
Epoch 212/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4241 - mae: 4.9013 - val_loss: 5.8038 - val_mae: 6.2801
Epoch 213/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4233 - mae: 4.9006 - val_loss: 5.8029 - val_mae: 6.2793
Epoch 214/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4226 - mae: 4.8999 - val_loss: 5.8050 - val_mae: 6.2813
Epoch 215/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4218 - mae: 4.8990 - val_loss: 5.7986 - val_mae: 6.2750
Epoch 216/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4212 - mae: 4.8985 - val_loss: 5.8157 - val_mae: 6.2919
Epoch 217/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4201 - mae: 4.8972 - val_loss: 5.7727 - val_mae: 6.2493
Epoch 218/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4212 - mae: 4.8983 - val_loss: 5.9284 - val_mae: 6.4064
Epoch 219/500
33/33 [==============================] - 0s 10ms/step - loss: 4.4185 - mae: 4.8952 - val_loss: 5.7362 - val_mae: 6.2127
Epoch 220/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4328 - mae: 4.9084 - val_loss: 5.8902 - val_mae: 6.3679
Epoch 221/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4235 - mae: 4.9010 - val_loss: 5.7129 - val_mae: 6.1900
Epoch 222/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4311 - mae: 4.9073 - val_loss: 6.0098 - val_mae: 6.4888
Epoch 223/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4156 - mae: 4.8929 - val_loss: 5.6693 - val_mae: 6.1468
Epoch 224/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4395 - mae: 4.9144 - val_loss: 5.7900 - val_mae: 6.2664
Epoch 225/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4231 - mae: 4.9005 - val_loss: 5.7993 - val_mae: 6.2760
Epoch 226/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4134 - mae: 4.8913 - val_loss: 5.6931 - val_mae: 6.1707
Epoch 227/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4151 - mae: 4.8917 - val_loss: 5.9471 - val_mae: 6.4258
Epoch 228/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4038 - mae: 4.8809 - val_loss: 5.6575 - val_mae: 6.1351
Epoch 229/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4280 - mae: 4.9032 - val_loss: 5.7819 - val_mae: 6.2583
Epoch 230/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4150 - mae: 4.8922 - val_loss: 5.7141 - val_mae: 6.1917
Epoch 231/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4116 - mae: 4.8888 - val_loss: 5.8809 - val_mae: 6.3589
Epoch 232/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4051 - mae: 4.8821 - val_loss: 5.6579 - val_mae: 6.1358
Epoch 233/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4193 - mae: 4.8951 - val_loss: 5.9148 - val_mae: 6.3928
Epoch 234/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4078 - mae: 4.8845 - val_loss: 5.6474 - val_mae: 6.1255
Epoch 235/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4232 - mae: 4.8992 - val_loss: 5.9270 - val_mae: 6.4054
Epoch 236/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4089 - mae: 4.8861 - val_loss: 5.6281 - val_mae: 6.1062
Epoch 237/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4231 - mae: 4.8992 - val_loss: 5.9298 - val_mae: 6.4085
Epoch 238/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4068 - mae: 4.8840 - val_loss: 5.6122 - val_mae: 6.0904
Epoch 239/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4212 - mae: 4.8975 - val_loss: 5.9023 - val_mae: 6.3803
Epoch 240/500
33/33 [==============================] - 0s 10ms/step - loss: 4.4049 - mae: 4.8820 - val_loss: 5.6073 - val_mae: 6.0855
Epoch 241/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4176 - mae: 4.8938 - val_loss: 5.9148 - val_mae: 6.3934
Epoch 242/500
33/33 [==============================] - 0s 10ms/step - loss: 4.4013 - mae: 4.8785 - val_loss: 5.5935 - val_mae: 6.0719
Epoch 243/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4166 - mae: 4.8931 - val_loss: 5.8631 - val_mae: 6.3408
Epoch 244/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4010 - mae: 4.8778 - val_loss: 5.5987 - val_mae: 6.0770
Epoch 245/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4129 - mae: 4.8891 - val_loss: 5.9199 - val_mae: 6.3987
Epoch 246/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3963 - mae: 4.8736 - val_loss: 5.5665 - val_mae: 6.0452
Epoch 247/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4155 - mae: 4.8922 - val_loss: 5.7719 - val_mae: 6.2486
Epoch 248/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3992 - mae: 4.8760 - val_loss: 5.5998 - val_mae: 6.0786
Epoch 249/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4054 - mae: 4.8818 - val_loss: 5.8961 - val_mae: 6.3743
Epoch 250/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3910 - mae: 4.8680 - val_loss: 5.5418 - val_mae: 6.0208
Epoch 251/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4153 - mae: 4.8921 - val_loss: 5.6909 - val_mae: 6.1687
Epoch 252/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3985 - mae: 4.8753 - val_loss: 5.7813 - val_mae: 6.2587
Epoch 253/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3902 - mae: 4.8669 - val_loss: 5.5799 - val_mae: 6.0586
Epoch 254/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4008 - mae: 4.8772 - val_loss: 5.8577 - val_mae: 6.3348
Epoch 255/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3838 - mae: 4.8605 - val_loss: 5.5146 - val_mae: 5.9941
Epoch 256/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4143 - mae: 4.8913 - val_loss: 5.6538 - val_mae: 6.1319
Epoch 257/500
33/33 [==============================] - 0s 8ms/step - loss: 4.4005 - mae: 4.8769 - val_loss: 5.8697 - val_mae: 6.3477
Epoch 258/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3891 - mae: 4.8664 - val_loss: 5.5332 - val_mae: 6.0121
Epoch 259/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4036 - mae: 4.8807 - val_loss: 5.8062 - val_mae: 6.2833
Epoch 260/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3877 - mae: 4.8640 - val_loss: 5.5666 - val_mae: 6.0453
Epoch 261/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4003 - mae: 4.8769 - val_loss: 5.8523 - val_mae: 6.3293
Epoch 262/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3829 - mae: 4.8599 - val_loss: 5.4939 - val_mae: 5.9740
Epoch 263/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4093 - mae: 4.8868 - val_loss: 5.6404 - val_mae: 6.1187
Epoch 264/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3950 - mae: 4.8714 - val_loss: 5.8611 - val_mae: 6.3390
Epoch 265/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3833 - mae: 4.8604 - val_loss: 5.5161 - val_mae: 5.9955
Epoch 266/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3982 - mae: 4.8754 - val_loss: 5.7901 - val_mae: 6.2672
Epoch 267/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3826 - mae: 4.8593 - val_loss: 5.5579 - val_mae: 6.0365
Epoch 268/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3953 - mae: 4.8719 - val_loss: 5.8217 - val_mae: 6.2986
Epoch 269/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3785 - mae: 4.8553 - val_loss: 5.4729 - val_mae: 5.9536
Epoch 270/500
33/33 [==============================] - 0s 9ms/step - loss: 4.4056 - mae: 4.8833 - val_loss: 5.6249 - val_mae: 6.1032
Epoch 271/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3925 - mae: 4.8688 - val_loss: 5.8538 - val_mae: 6.3316
Epoch 272/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3798 - mae: 4.8570 - val_loss: 5.4911 - val_mae: 5.9712
Epoch 273/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3963 - mae: 4.8739 - val_loss: 5.6973 - val_mae: 6.1757
Epoch 274/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3792 - mae: 4.8561 - val_loss: 5.6411 - val_mae: 6.1204
Epoch 275/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3756 - mae: 4.8511 - val_loss: 5.8305 - val_mae: 6.3083
Epoch 276/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3705 - mae: 4.8467 - val_loss: 5.5182 - val_mae: 5.9975
Epoch 277/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3883 - mae: 4.8648 - val_loss: 5.8787 - val_mae: 6.3569
Epoch 278/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3715 - mae: 4.8485 - val_loss: 5.4936 - val_mae: 5.9738
Epoch 279/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3958 - mae: 4.8736 - val_loss: 5.7129 - val_mae: 6.1907
Epoch 280/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3797 - mae: 4.8570 - val_loss: 5.7567 - val_mae: 6.2349
Epoch 281/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3726 - mae: 4.8494 - val_loss: 5.6258 - val_mae: 6.1051
Epoch 282/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3766 - mae: 4.8520 - val_loss: 5.8099 - val_mae: 6.2881
Epoch 283/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3697 - mae: 4.8462 - val_loss: 5.4826 - val_mae: 5.9632
Epoch 284/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3919 - mae: 4.8696 - val_loss: 5.7645 - val_mae: 6.2418
Epoch 285/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3755 - mae: 4.8527 - val_loss: 5.5944 - val_mae: 6.0735
Epoch 286/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3814 - mae: 4.8583 - val_loss: 5.9171 - val_mae: 6.3965
Epoch 287/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3765 - mae: 4.8532 - val_loss: 5.5245 - val_mae: 6.0040
Epoch 288/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3975 - mae: 4.8743 - val_loss: 5.9291 - val_mae: 6.4089
Epoch 289/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3789 - mae: 4.8567 - val_loss: 5.4857 - val_mae: 5.9660
Epoch 290/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3969 - mae: 4.8744 - val_loss: 5.9073 - val_mae: 6.3867
Epoch 291/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3756 - mae: 4.8530 - val_loss: 5.5048 - val_mae: 5.9843
Epoch 292/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3922 - mae: 4.8694 - val_loss: 5.8508 - val_mae: 6.3289
Epoch 293/500
33/33 [==============================] - 0s 10ms/step - loss: 4.3731 - mae: 4.8507 - val_loss: 5.4380 - val_mae: 5.9190
Epoch 294/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3928 - mae: 4.8708 - val_loss: 5.6497 - val_mae: 6.1286
Epoch 295/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3730 - mae: 4.8493 - val_loss: 5.8301 - val_mae: 6.3090
Epoch 296/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3640 - mae: 4.8408 - val_loss: 5.4721 - val_mae: 5.9526
Epoch 297/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3813 - mae: 4.8575 - val_loss: 5.7477 - val_mae: 6.2272
Epoch 298/500
33/33 [==============================] - 0s 10ms/step - loss: 4.3620 - mae: 4.8386 - val_loss: 5.4074 - val_mae: 5.8885
Epoch 299/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3883 - mae: 4.8664 - val_loss: 5.5808 - val_mae: 6.0597
Epoch 300/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3765 - mae: 4.8525 - val_loss: 5.8120 - val_mae: 6.2909
Epoch 301/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3640 - mae: 4.8410 - val_loss: 5.4315 - val_mae: 5.9126
Epoch 302/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3833 - mae: 4.8613 - val_loss: 5.6272 - val_mae: 6.1061
Epoch 303/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3668 - mae: 4.8427 - val_loss: 5.8379 - val_mae: 6.3171
Epoch 304/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3587 - mae: 4.8353 - val_loss: 5.4603 - val_mae: 5.9413
Epoch 305/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3762 - mae: 4.8527 - val_loss: 5.8912 - val_mae: 6.3709
Epoch 306/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3583 - mae: 4.8353 - val_loss: 5.4716 - val_mae: 5.9526
Epoch 307/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3789 - mae: 4.8562 - val_loss: 5.8784 - val_mae: 6.3578
Epoch 308/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3627 - mae: 4.8398 - val_loss: 5.5055 - val_mae: 5.9855
Epoch 309/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3816 - mae: 4.8585 - val_loss: 5.8589 - val_mae: 6.3374
Epoch 310/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3644 - mae: 4.8420 - val_loss: 5.4310 - val_mae: 5.9122
Epoch 311/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3863 - mae: 4.8645 - val_loss: 5.6133 - val_mae: 6.0920
Epoch 312/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3716 - mae: 4.8478 - val_loss: 5.8520 - val_mae: 6.3310
Epoch 313/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3610 - mae: 4.8381 - val_loss: 5.4429 - val_mae: 5.9240
Epoch 314/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3767 - mae: 4.8543 - val_loss: 5.7863 - val_mae: 6.2644
Epoch 315/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3571 - mae: 4.8337 - val_loss: 5.5092 - val_mae: 5.9896
Epoch 316/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3706 - mae: 4.8491 - val_loss: 5.8256 - val_mae: 6.3029
Epoch 317/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3702 - mae: 4.8467 - val_loss: 5.5406 - val_mae: 6.0201
Epoch 318/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3897 - mae: 4.8682 - val_loss: 5.6561 - val_mae: 6.1353
Epoch 319/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3875 - mae: 4.8628 - val_loss: 5.8954 - val_mae: 6.3752
Epoch 320/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3735 - mae: 4.8520 - val_loss: 5.4238 - val_mae: 5.9047
Epoch 321/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3812 - mae: 4.8608 - val_loss: 5.6021 - val_mae: 6.0809
Epoch 322/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3761 - mae: 4.8525 - val_loss: 5.8315 - val_mae: 6.3110
Epoch 323/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3602 - mae: 4.8371 - val_loss: 5.6078 - val_mae: 6.0888
Epoch 324/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3559 - mae: 4.8307 - val_loss: 5.7482 - val_mae: 6.2291
Epoch 325/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3485 - mae: 4.8243 - val_loss: 5.3694 - val_mae: 5.8501
Epoch 326/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3674 - mae: 4.8438 - val_loss: 5.7670 - val_mae: 6.2478
Epoch 327/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3451 - mae: 4.8215 - val_loss: 5.3590 - val_mae: 5.8397
Epoch 328/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3642 - mae: 4.8410 - val_loss: 5.7609 - val_mae: 6.2407
Epoch 329/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3429 - mae: 4.8189 - val_loss: 5.4254 - val_mae: 5.9064
Epoch 330/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3637 - mae: 4.8425 - val_loss: 5.8844 - val_mae: 6.3627
Epoch 331/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3602 - mae: 4.8366 - val_loss: 5.4968 - val_mae: 5.9774
Epoch 332/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3827 - mae: 4.8587 - val_loss: 5.9351 - val_mae: 6.4164
Epoch 333/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3614 - mae: 4.8394 - val_loss: 5.4296 - val_mae: 5.9106
Epoch 334/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3753 - mae: 4.8520 - val_loss: 5.8041 - val_mae: 6.2844
Epoch 335/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3539 - mae: 4.8307 - val_loss: 5.3645 - val_mae: 5.8453
Epoch 336/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3684 - mae: 4.8460 - val_loss: 5.6055 - val_mae: 6.0858
Epoch 337/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3494 - mae: 4.8253 - val_loss: 5.7242 - val_mae: 6.2057
Epoch 338/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3411 - mae: 4.8169 - val_loss: 5.3527 - val_mae: 5.8333
Epoch 339/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3564 - mae: 4.8329 - val_loss: 5.7297 - val_mae: 6.2096
Epoch 340/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3352 - mae: 4.8106 - val_loss: 5.4634 - val_mae: 5.9452
Epoch 341/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3498 - mae: 4.8272 - val_loss: 5.9414 - val_mae: 6.4214
Epoch 342/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3507 - mae: 4.8266 - val_loss: 5.4842 - val_mae: 5.9652
Epoch 343/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3758 - mae: 4.8528 - val_loss: 5.8704 - val_mae: 6.3505
Epoch 344/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3545 - mae: 4.8311 - val_loss: 5.6385 - val_mae: 6.1197
Epoch 345/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3552 - mae: 4.8317 - val_loss: 5.9329 - val_mae: 6.4145
Epoch 346/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3509 - mae: 4.8264 - val_loss: 5.4610 - val_mae: 5.9418
Epoch 347/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3727 - mae: 4.8492 - val_loss: 5.8548 - val_mae: 6.3345
Epoch 348/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3551 - mae: 4.8325 - val_loss: 5.3830 - val_mae: 5.8639
Epoch 349/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3694 - mae: 4.8472 - val_loss: 5.6872 - val_mae: 6.1672
Epoch 350/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3466 - mae: 4.8224 - val_loss: 5.8296 - val_mae: 6.3102
Epoch 351/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3387 - mae: 4.8148 - val_loss: 5.3893 - val_mae: 5.8702
Epoch 352/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3575 - mae: 4.8340 - val_loss: 5.6360 - val_mae: 6.1182
Epoch 353/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3399 - mae: 4.8165 - val_loss: 5.3128 - val_mae: 5.7931
Epoch 354/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3586 - mae: 4.8351 - val_loss: 5.4946 - val_mae: 5.9757
Epoch 355/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3503 - mae: 4.8260 - val_loss: 5.6496 - val_mae: 6.1317
Epoch 356/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3380 - mae: 4.8146 - val_loss: 5.3118 - val_mae: 5.7921
Epoch 357/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3572 - mae: 4.8335 - val_loss: 5.5014 - val_mae: 5.9824
Epoch 358/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3467 - mae: 4.8219 - val_loss: 5.8873 - val_mae: 6.3679
Epoch 359/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3297 - mae: 4.8054 - val_loss: 5.3663 - val_mae: 5.8471
Epoch 360/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3511 - mae: 4.8273 - val_loss: 5.5324 - val_mae: 6.0132
Epoch 361/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3453 - mae: 4.8208 - val_loss: 5.7932 - val_mae: 6.2747
Epoch 362/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3344 - mae: 4.8108 - val_loss: 5.3412 - val_mae: 5.8221
Epoch 363/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3600 - mae: 4.8367 - val_loss: 5.5459 - val_mae: 6.0261
Epoch 364/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3503 - mae: 4.8257 - val_loss: 5.9607 - val_mae: 6.4429
Epoch 365/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3361 - mae: 4.8116 - val_loss: 5.4774 - val_mae: 5.9584
Epoch 366/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3528 - mae: 4.8287 - val_loss: 5.9953 - val_mae: 6.4779
Epoch 367/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3369 - mae: 4.8130 - val_loss: 5.4730 - val_mae: 5.9542
Epoch 368/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3559 - mae: 4.8329 - val_loss: 5.7851 - val_mae: 6.2646
Epoch 369/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3404 - mae: 4.8162 - val_loss: 5.9412 - val_mae: 6.4234
Epoch 370/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3348 - mae: 4.8103 - val_loss: 5.4829 - val_mae: 5.9637
Epoch 371/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3534 - mae: 4.8320 - val_loss: 6.0937 - val_mae: 6.5762
Epoch 372/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3477 - mae: 4.8237 - val_loss: 5.5160 - val_mae: 5.9967
Epoch 373/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3742 - mae: 4.8511 - val_loss: 5.6867 - val_mae: 6.1668
Epoch 374/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3611 - mae: 4.8371 - val_loss: 6.0491 - val_mae: 6.5315
Epoch 375/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3495 - mae: 4.8269 - val_loss: 5.4618 - val_mae: 5.9428
Epoch 376/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3602 - mae: 4.8369 - val_loss: 6.0142 - val_mae: 6.4961
Epoch 377/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3405 - mae: 4.8171 - val_loss: 5.3962 - val_mae: 5.8772
Epoch 378/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3597 - mae: 4.8370 - val_loss: 5.6138 - val_mae: 6.0944
Epoch 379/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3443 - mae: 4.8196 - val_loss: 5.9376 - val_mae: 6.4186
Epoch 380/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3359 - mae: 4.8124 - val_loss: 5.3970 - val_mae: 5.8778
Epoch 381/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3506 - mae: 4.8271 - val_loss: 5.7479 - val_mae: 6.2284
Epoch 382/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3313 - mae: 4.8068 - val_loss: 5.8582 - val_mae: 6.3388
Epoch 383/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3247 - mae: 4.8000 - val_loss: 5.4454 - val_mae: 5.9271
Epoch 384/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3470 - mae: 4.8253 - val_loss: 5.6152 - val_mae: 6.0942
Epoch 385/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3660 - mae: 4.8413 - val_loss: 5.6168 - val_mae: 6.0968
Epoch 386/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3726 - mae: 4.8503 - val_loss: 5.5579 - val_mae: 6.0379
Epoch 387/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3891 - mae: 4.8645 - val_loss: 6.1157 - val_mae: 6.5980
Epoch 388/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3646 - mae: 4.8437 - val_loss: 5.4714 - val_mae: 5.9526
Epoch 389/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3568 - mae: 4.8343 - val_loss: 5.5565 - val_mae: 6.0364
Epoch 390/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3832 - mae: 4.8583 - val_loss: 5.5660 - val_mae: 6.0456
Epoch 391/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3874 - mae: 4.8627 - val_loss: 6.0309 - val_mae: 6.5137
Epoch 392/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3495 - mae: 4.8284 - val_loss: 5.6924 - val_mae: 6.1744
Epoch 393/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3307 - mae: 4.8071 - val_loss: 5.7216 - val_mae: 6.2038
Epoch 394/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3221 - mae: 4.7975 - val_loss: 5.2578 - val_mae: 5.7384
Epoch 395/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3325 - mae: 4.8077 - val_loss: 5.7803 - val_mae: 6.2625
Epoch 396/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3128 - mae: 4.7883 - val_loss: 5.2736 - val_mae: 5.7536
Epoch 397/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3322 - mae: 4.8078 - val_loss: 5.4412 - val_mae: 5.9230
Epoch 398/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3186 - mae: 4.7956 - val_loss: 5.1973 - val_mae: 5.6805
Epoch 399/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3305 - mae: 4.8048 - val_loss: 5.3617 - val_mae: 5.8422
Epoch 400/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3199 - mae: 4.7943 - val_loss: 5.7305 - val_mae: 6.2120
Epoch 401/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3076 - mae: 4.7813 - val_loss: 5.4890 - val_mae: 5.9707
Epoch 402/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3253 - mae: 4.7981 - val_loss: 5.5121 - val_mae: 5.9950
Epoch 403/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3235 - mae: 4.8008 - val_loss: 5.2498 - val_mae: 5.7317
Epoch 404/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3329 - mae: 4.8075 - val_loss: 5.4437 - val_mae: 5.9255
Epoch 405/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3333 - mae: 4.8091 - val_loss: 5.5039 - val_mae: 5.9853
Epoch 406/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3363 - mae: 4.8116 - val_loss: 5.9174 - val_mae: 6.3979
Epoch 407/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3257 - mae: 4.8026 - val_loss: 5.3420 - val_mae: 5.8225
Epoch 408/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3422 - mae: 4.8174 - val_loss: 5.5446 - val_mae: 6.0251
Epoch 409/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3368 - mae: 4.8125 - val_loss: 5.6004 - val_mae: 6.0809
Epoch 410/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3368 - mae: 4.8120 - val_loss: 6.1096 - val_mae: 6.5915
Epoch 411/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3278 - mae: 4.8043 - val_loss: 5.3977 - val_mae: 5.8789
Epoch 412/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3491 - mae: 4.8246 - val_loss: 5.5998 - val_mae: 6.0797
Epoch 413/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3433 - mae: 4.8189 - val_loss: 5.9099 - val_mae: 6.3907
Epoch 414/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3309 - mae: 4.8068 - val_loss: 5.9607 - val_mae: 6.4431
Epoch 415/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3266 - mae: 4.8023 - val_loss: 5.8417 - val_mae: 6.3222
Epoch 416/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3264 - mae: 4.8014 - val_loss: 6.0974 - val_mae: 6.5807
Epoch 417/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3257 - mae: 4.8011 - val_loss: 5.4841 - val_mae: 5.9652
Epoch 418/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3451 - mae: 4.8209 - val_loss: 5.6730 - val_mae: 6.1538
Epoch 419/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3414 - mae: 4.8166 - val_loss: 6.2043 - val_mae: 6.6888
Epoch 420/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3363 - mae: 4.8130 - val_loss: 5.4771 - val_mae: 5.9583
Epoch 421/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3563 - mae: 4.8325 - val_loss: 5.6312 - val_mae: 6.1114
Epoch 422/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3517 - mae: 4.8268 - val_loss: 6.2350 - val_mae: 6.7200
Epoch 423/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3416 - mae: 4.8186 - val_loss: 5.4807 - val_mae: 5.9615
Epoch 424/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3541 - mae: 4.8303 - val_loss: 5.8298 - val_mae: 6.3096
Epoch 425/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3378 - mae: 4.8130 - val_loss: 6.0820 - val_mae: 6.5654
Epoch 426/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3302 - mae: 4.8064 - val_loss: 5.4764 - val_mae: 5.9575
Epoch 427/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3409 - mae: 4.8163 - val_loss: 6.1405 - val_mae: 6.6241
Epoch 428/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3310 - mae: 4.8072 - val_loss: 5.4444 - val_mae: 5.9256
Epoch 429/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3528 - mae: 4.8287 - val_loss: 5.6370 - val_mae: 6.1177
Epoch 430/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3439 - mae: 4.8188 - val_loss: 6.1185 - val_mae: 6.6019
Epoch 431/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3367 - mae: 4.8132 - val_loss: 5.4667 - val_mae: 5.9477
Epoch 432/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3483 - mae: 4.8233 - val_loss: 6.1034 - val_mae: 6.5864
Epoch 433/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3312 - mae: 4.8080 - val_loss: 5.4110 - val_mae: 5.8918
Epoch 434/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3464 - mae: 4.8224 - val_loss: 5.6782 - val_mae: 6.1594
Epoch 435/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3333 - mae: 4.8080 - val_loss: 6.0268 - val_mae: 6.5096
Epoch 436/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3274 - mae: 4.8035 - val_loss: 5.4247 - val_mae: 5.9056
Epoch 437/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3396 - mae: 4.8145 - val_loss: 6.0182 - val_mae: 6.5009
Epoch 438/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3241 - mae: 4.8005 - val_loss: 5.3947 - val_mae: 5.8753
Epoch 439/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3399 - mae: 4.8159 - val_loss: 5.6825 - val_mae: 6.1637
Epoch 440/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3274 - mae: 4.8021 - val_loss: 5.9878 - val_mae: 6.4703
Epoch 441/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3232 - mae: 4.7990 - val_loss: 5.4096 - val_mae: 5.8903
Epoch 442/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3364 - mae: 4.8116 - val_loss: 5.9934 - val_mae: 6.4760
Epoch 443/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3213 - mae: 4.7973 - val_loss: 5.4028 - val_mae: 5.8835
Epoch 444/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3374 - mae: 4.8134 - val_loss: 5.8538 - val_mae: 6.3344
Epoch 445/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3210 - mae: 4.7963 - val_loss: 5.6520 - val_mae: 6.1340
Epoch 446/500
33/33 [==============================] - 0s 9ms/step - loss: 4.3231 - mae: 4.7979 - val_loss: 5.9736 - val_mae: 6.4557
Epoch 447/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3213 - mae: 4.7968 - val_loss: 5.3953 - val_mae: 5.8759
Epoch 448/500
33/33 [==============================] - 0s 8ms/step - loss: 4.3360 - mae: 4.8122 - val_loss: 5.8250 - val_mae: 6.3059
Out[8]:
<tensorflow.python.keras.callbacks.History at 0x7f8a5b9c8f98>
In [9]:
model = keras.models.load_model("my_checkpoint.h5")
In [10]:
rnn_forecast = model.predict(series[np.newaxis, :, np.newaxis])
rnn_forecast = rnn_forecast[0, split_time - 1:-1, 0]
In [11]:
plt.figure(figsize=(10, 6))
plot_series(time_valid, x_valid)
plot_series(time_valid, rnn_forecast)
In [12]:
keras.metrics.mean_absolute_error(x_valid, rnn_forecast).numpy()
Out[12]:
5.788751